/*
 * Copyright 2000-2009 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.neuronbit.businessflow.intellij.editor.swing.editor.quickFixes;

import com.intellij.codeInspection.util.IntentionName;
//import com.neuronbit.businessflow.intellij.editor.swing.GuiEditor;
import com.neuronbit.businessflow.intellij.editor.swing.editor.RadComponent;
import com.neuronbit.businessflow.intellij.editor.swing.GuiEditor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * The type Quick fix.
 */
public abstract class QuickFix {
    /**
     * The constant EMPTY_ARRAY.
     */
    public static final QuickFix[] EMPTY_ARRAY = {};

    /**
     * The My editor.
     */
    protected final GuiEditor myEditor;
  private final @IntentionName String myName;
    /**
     * The My component.
     */
    protected RadComponent myComponent;

    /**
     * Instantiates a new Quick fix.
     *
     * @param editor    the editor
     * @param name      the name
     * @param component the component
     */
    public QuickFix(@NotNull GuiEditor editor, @NotNull @IntentionName String name, @Nullable RadComponent component) {
    myEditor = editor;
    myName = name;
    myComponent = component;
  }

    /**
     * Gets name.
     *
     * @return name of the quick fix.
     */
    @NotNull public final @IntentionName String getName() {
    return myName;
  }

    /**
     * Run.
     */
    public abstract void run();

    /**
     * Gets component.
     *
     * @return the component
     */
    public RadComponent getComponent() {
    return myComponent;
  }
}
